package ${pkg};

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotBlank;

import com.blue.validation.Mobile;
import com.blue.validation.group.SaveModel;
import com.blue.validation.group.UpdateModel;
<#if impList??>
<#list impList as vo>
import ${vo};
</#list>
</#if>

/**
 * ${name}请求内容
 * 
 * @author 代码由 blue-code 框架生成
 * @since 1.0 ${.now?string("yyyy年MM月dd日")}
 */
 public class ${clazz}Request implements Serializable
{
	private static final long serialVersionUID = 1L;
	
	<#if idList??>
	<#list idList as vo>
	@NotNull(groups = { UpdateModel.class }, message = "${vo.name}不能为空")
	@Null(groups={SaveModel.class}, message="${vo.name}必须为空")
	private ${vo.type} ${vo.field};
	</#list>
	</#if>
	<#if columnList??>
	<#list columnList as vo>
	<#if vo.type == "String">
	<#if !vo.nullable>
	@NotBlank(groups = { SaveModel.class }, message = "${vo.name}不能为空")
	</#if>
	@Size(min = 0, max = ${vo.size?c}, groups = { SaveModel.class, UpdateModel.class }, message = "${vo.name}长度[0-${vo.size?c}]")
	<#else>
	<#if !vo.nullable>
	@NotNull(groups = { SaveModel.class }, message = "${vo.name}不能为空")
	</#if>
	</#if>
	private ${vo.type} ${vo.field};
	</#list>
	</#if>
	
	public ${clazz}Request()
	{
	}
	
	<#if idList??>
	<#list idList as vo>
	public ${vo.type} ${vo.getter}()
	{
		return this.${vo.field};
	}
	
	public void ${vo.setter}(${vo.type} ${vo.field})
	{
		this.${vo.field} = ${vo.field};
	}
	</#list>
	</#if>
	
	<#if columnList??>
	<#list columnList as vo>
	public ${vo.type} ${vo.getter}()
	{
		return this.${vo.field};
	}
	
	public void ${vo.setter}(${vo.type} ${vo.field})
	{
		this.${vo.field} = ${vo.field};
	}
	
	</#list>
	</#if>
}
